package com.easy.query.test.entity.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.TopicAuto;
import com.easy.query.core.proxy.columns.types.SQLIntegerTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLLocalDateTimeTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class TopicAutoProxy extends AbstractProxyEntity<TopicAutoProxy, TopicAuto> {

    private static final Class<TopicAuto> entityClass = TopicAuto.class;

    public static TopicAutoProxy createTable() {
        return new TopicAutoProxy();
    }

    public TopicAutoProxy() {
    }

    /**
     * {@link TopicAuto#getId}
     */
    public SQLIntegerTypeColumn<TopicAutoProxy> id() {
        return getIntegerTypeColumn("id");
    }

    /**
     * {@link TopicAuto#getStars}
     */
    public SQLIntegerTypeColumn<TopicAutoProxy> stars() {
        return getIntegerTypeColumn("stars");
    }

    /**
     * {@link TopicAuto#getTitle}
     */
    public SQLStringTypeColumn<TopicAutoProxy> title() {
        return getStringTypeColumn("title");
    }

    /**
     * {@link TopicAuto#getCreateTime}
     */
    public SQLLocalDateTimeTypeColumn<TopicAutoProxy> createTime() {
        return getLocalDateTimeTypeColumn("createTime");
    }


    @Override
    public Class<TopicAuto> getEntityClass() {
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public TopicAutoProxyFetcher FETCHER = new TopicAutoProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class TopicAutoProxyFetcher extends AbstractFetcher<TopicAutoProxy, TopicAuto, TopicAutoProxyFetcher> {

        public TopicAutoProxyFetcher(TopicAutoProxy proxy, TopicAutoProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link TopicAuto#getId}
         */
        public TopicAutoProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link TopicAuto#getStars}
         */
        public TopicAutoProxyFetcher stars() {
            return add(getProxy().stars());
        }

        /**
         * {@link TopicAuto#getTitle}
         */
        public TopicAutoProxyFetcher title() {
            return add(getProxy().title());
        }

        /**
         * {@link TopicAuto#getCreateTime}
         */
        public TopicAutoProxyFetcher createTime() {
            return add(getProxy().createTime());
        }


        @Override
        protected TopicAutoProxyFetcher createFetcher(TopicAutoProxy cp, AbstractFetcher<TopicAutoProxy, TopicAuto, TopicAutoProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new TopicAutoProxyFetcher(cp, this, sqlSelectExpression);
        }
    }

}
